#ifndef __CONFIGDIALOG_H__
#define __CONFIGDIALOG_H__

#include <QDialog>

class QListWidget;
class QStackedWidget;
class QListWidgetItem;
class QFormLayout;
class QVBoxLayout;
class QHBoxLayout;
class QLineEdit;
class QPushButton;
class QSlider;
class QLabel;

namespace Ui {

class ConfigDialog : public QDialog {
Q_OBJECT

public:
	ConfigDialog(QString *host, quint16 *port, quint16 *inactivityTime,QWidget *parent=0);
	~ConfigDialog();

public slots:
	void changePage(QListWidgetItem *current, QListWidgetItem *previous);
	void changeHost(const QString &text);
	void changePort(const QString &text);
	void changeInactivityTime(int value);

private:
	void createIcons();
	void createConnectionConfig();
	void createGeneralConfig();

	QString *hostValue;
	quint16 *portValue;
	quint16 *inactivityTimeValue;

	
	/* ConnectionConfig widgets */
	QFormLayout *connectionLayout;
	QLineEdit *host;
	QLineEdit *port;
	QWidget* connectionConfigWidget; 

	/* GeneralConfig widget*/
	QFormLayout *generalLayout;
	QHBoxLayout *timeLayout;
	QLabel *timeLabel;
	QSlider *timeSlider;
	QWidget* generalConfigWidget; 

	/* Main widgets */
	QPushButton *closeButton;
	QHBoxLayout *horizontalLayout;
	QHBoxLayout *buttonsLayout;
	QVBoxLayout *mainLayout;
	QListWidget *contentsWidget;
	QStackedWidget *pagesWidget;
};

}

#endif
